import request from '@/utils/request'

export function getPositionList(query) {
  return request({
    url: '/mechanism/position/getList',
    method: 'post',
    data: query
  })
}

export function getPositionUsable(query) {
  return request({
    url: '/mechanism/position/getAvailable',
    method: 'post',
    data: query
  })
}

export function getPositionDetail(id) {
  return request({
    url: '/mechanism/position/getDetail',
    method: 'post',
    data:  id 
  })
}

export function savePosition(id) {
  return request({
    url: '/mechanism/position/save',
    method: 'post',
    data: id
  })
}

export function removePositionByID(id) {
  return request({
    url: '/mechanism/position/remove',
    method: 'post',
    data: id
  })
}

export function changePositionStatusByID(formdata) {
  return request({
    url: '/mechanism/position/change-status',
    method: 'post',
    data: formdata
  })
}

